package com.marst.first.handler;

import com.marst.first.Exception.TokenVerifyException;
import com.marst.first.bean.VO.Result;
import com.marst.first.config.PublicConfig;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class PublicExceptionHandler {
    @ExceptionHandler
    Result handleTokenVerifyException(TokenVerifyException tokenVerifyException ){
        return new Result(PublicConfig.TOKEN_ERROR_CODE,PublicConfig.TOKEN_ERROR_MESSAGE);
    }
}
